<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import MainLayout from './layouts/MainLayout.vue'

// 判断当前路由是否需要显示主布局
const route = useRoute()
const showMainLayout = computed(() => {
  return !route.meta.hideNavbar
})
</script>

<template>
  <MainLayout v-if="showMainLayout">
    <router-view />
  </MainLayout>
  <router-view v-else />
</template>

<style>
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

#app {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}
</style>
